package  {
	import fs.tileMap.data.MapData;
	
	/**
	 * ...
	 * @author flyingSnow
	 */
	public class RegularMapData extends MapData {
		
		public function RegularMapData(width:int, height:int, initValue:int = 0) {
			super(width, height, initValue);
			
			//var count:int = 0;
			for (var c:int = 0; c < width; c++ ) {
				var hor:int = height / 2  + Math.random() * 5 - 2;
				for (var r:int = 0; r < height; r++) {
					if(r>hor||c==0||r==0||c==width){
						_dataArray[c * height + r] = 0xff0000;
						//count++;
					}
				}
			}
			//_dataArray[0] = _dataArray[height] = _dataArray[(width - 1) * height-1] = _dataArray[(width-1)*height]=0xff0000;
		}
		
	}

}